<form method="post" action="<?php _actionUrl($this)?>" onsubmit="return ajax_form(this,true)">
<div class="x-list-title"> 
<table height="100%" width="100%" border="0" cellpadding="0">
<tr><td>
<h2>Tìm kiếm công ty</h2>
</td></tr></table>
</div>
<div class="x-form-container">
<table width="100%" border="0" cellpadding="0" class="x-form">
<tr>
	<td class="x-form-label x-form-label-special">
		Từ khóa tìm kiếm: 
	</td>
	<td class="x-form-input">
		<input type="text" name="s" class="x-text x-normal-text" value=""/>
	</td>
</tr>
<tr>
	<td class="x-form-label">
		Mã: 
	</td>
	<td class="x-form-input">
		<input type="text" name="code" class="x-text x-small-text" value=""/>
	</td>
</tr>

<tr>
	<td class="x-form-label">
		Tên công ty: 
	</td>
	<td class="x-form-input">
		<input type="text" name="name" class="x-text x-normal-text" value=""/>
	</td>
</tr>

<tr>
	<td class="x-form-label">
		Nhóm công ty: 
	</td>
	<td class="x-form-input">
		<?php _e( tpl_search_select('parent_id[]','ID','title',$this->get('cats')) );?>
	</td>
</tr>

<tr>
	<td class="x-form-label">
		Ngành nghề: 
	</td>
	<td class="x-form-input">
		<?php _e( tpl_search_select('trade_id[]','ID','title',$this->get('trades')) );?>
	</td>
</tr>

<tr>
	<td class="x-form-label">
		Điện thoại: 
	</td>
	<td class="x-form-input">
		<?php _e( tpl_input_phone('phone') );?>
	</td>
</tr>

<tr>
	<td class="x-form-label">
		Fax: 
	</td>
	<td class="x-form-input">
		<?php _e( tpl_input_fax('fax') );?>
	</td>
</tr>

<tr>
	<td class="x-form-label" valign="top"> Khu vực : </td>
	<td class="x-form-input">
		<div>
		<select name="country_id" class="x-select" onchange="load_state(this)">
			<option style="color:#ccc" value="">Quốc gia</option>
			<?php foreach( $this->get('countries') as $a ):?>
			<option value="<?php _e($a['ID']);?>"><?php _e($a['title']);?></option>
			<?php endforeach;?>
		</select><br/>				
		
		<select dt="state"  onchange="load_district(this)" style="min-width:260px" name="state_id" class="x-select" disabled>
			<option>Tỉnh thành</option>
		</select><br/>
		<select dt="district" style="min-width:260px" name="district_id" class="x-select" disabled>
			<option>Quận huyện</option>
		</select>
		<br/>
		</div>
	</td>
</tr>

<tr>
	<td class="x-form-label">
		Trụ sở: 
	</td>
	<td class="x-form-input">
		<?php _e( tpl_input_address('address') );?>
	</td>
</tr>

<tr>
	<td class="x-form-label">
		Website: 
	</td>
	<td class="x-form-input">
		<?php _e( tpl_input_url('website') );?>
	</td>
</tr>
<tr>	
	<td class="x-form-label">
		Người chăm sóc:
	</td>
	<td class="x-form-input">
		<?php _e( tpl_select_users('care_by_id[]','Chọn người chăm sóc') ); ?>
	</td>
</tr>
<tr>
	<td></td>
	<td>
		<?php echo tpl_button_add('Tìm kiếm');?>
		<?php echo tpl_button_back('Quay lại danh sách công ty','#Crm/Customer');?>				
	</td>
</tr>
</table></div>
</form>